<div th:unless="${#lists.isEmpty(commentPage.datas)}">
	<iterator th:remove="tag" th:each="comment : ${commentPage.datas}">
	<div th:if="${commentPage.param.mode.name() == 'TREE'}">
		<div
			th:replace="fragment :: treeComment(${comment.parent},${comment},3)"></div>
	</div>
	<div th:if="${commentPage.param.mode.name() == 'LIST'}"
		th:id="'comment'+${comment.id}" class="media"
		th:data-p="${comment.parent == null ? '' : comment.parent.id}">
		<a class="pull-left"
			th:attr="target=${comment.website == null ? null : '_blank'},href=${comment.website == null ? null : comment.website},rel=${(comment.admin || comment.website == null) ? null : 'external nofollow'}">
			<img class="media-object"
			th:src="${gravatars.getOptionalUrl(comment.gravatar).orElse('/static/img/guest.png')}"
			data-holder-rendered="true" style="width: 64px; height: 64px;">
		</a>
		<div class="media-body">
			<h5 class="media-heading">
				<strong><span class="glyphicon glyphicon-user"
					style="color: red" title="管理员" th:if="${comment.admin}"></span><span
					th:text="${comment.nickname}"></span></strong>&nbsp;&nbsp;&nbsp;<span
					th:if="${comment.parent != null}" th:remove="tag"> <span
					class="glyphicon glyphicon-share-alt" aria-hidden="true"></span>&nbsp;&nbsp;
					<span class="glyphicon glyphicon-user" style="color: red"
					title="管理员" th:if="${comment.parent.admin}"></span><span
					th:text="${comment.parent.nickname}"></span>
				</span>
			</h5>
			<p style="word-break: break-all" th:utext="${comment.content}"></p>
			<h5>
				<span
					th:text="${times.format(comment.commentDate,'yyyy-MM-dd HH:mm')}" th:data-timestamp="${times.getTime(comment.commentDate)}"></span>&nbsp;&nbsp;&nbsp;
				<a href="###" th:if="${user != null}"
					th:onclick="'removeComment(\''+${comment.id}+'\')'"
					style="margin-right: 8px"><span
					class="glyphicon glyphicon-remove" aria-hidden="true"></span></a> <a
					href="###"
					th:if="${user != null && comment.status.name() == 'CHECK'}"
					th:onclick="'checkComment(\''+${comment.id}+'\')'"
					style="margin-right: 8px"><span class="glyphicon glyphicon-ok"
					aria-hidden="true"></span></a> <a href="###" style="margin-right: 8px"
					th:onclick="'toReply(\''+${comment.id}+'\')'"><span
					class="glyphicon glyphicon-comment" aria-hidden="true"></span></a> <a
					href="###" th:unless="${#lists.isEmpty(comment.parents)}"
					th:onclick="'queryConversations(\''+${comment.id}+'\')'">查看对话</a>
			</h5>
		</div>
	</div>
	</iterator>
</div>
<div th:if="${commentPage.totalPage > 1}">
	<ul class="pagination">
		<li
			th:each=" i : ${#numbers.sequence(commentPage.listbegin, commentPage.listend-1)}"
			th:class="${(i == commentPage.param.currentPage) ? 'active' : ''}"><a
			href="###" th:onclick="'queryComments(\''+${i}+'\')'" th:text="${i}"></a>
	</ul>
</div>
